package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ShopBalanceMapper;
import com.ruoyi.business.domain.ShopBalance;
import com.ruoyi.business.service.IShopBalanceService;

/**
 * 商户余额Service业务层处理
 * 
 * @author wxy
 * @date 2024-09-18
 */
@Service
public class ShopBalanceServiceImpl implements IShopBalanceService 
{
    @Autowired
    private ShopBalanceMapper shopBalanceMapper;

    /**
     * 查询商户余额
     * 
     * @param id 商户余额主键
     * @return 商户余额
     */
    @Override
    public ShopBalance selectShopBalanceById(Long id)
    {
        return shopBalanceMapper.selectShopBalanceById(id);
    }

    @Override
    public ShopBalance selectShopBalanceByShopId(Long shopId)
    {
        return shopBalanceMapper.selectShopBalanceByShopId(shopId);
    }

    /**
     * 查询商户余额列表
     * 
     * @param shopBalance 商户余额
     * @return 商户余额
     */
    @Override
    public List<ShopBalance> selectShopBalanceList(ShopBalance shopBalance)
    {
        return shopBalanceMapper.selectShopBalanceList(shopBalance);
    }

    /**
     * 新增商户余额
     * 
     * @param shopBalance 商户余额
     * @return 结果
     */
    @Override
    public int insertShopBalance(ShopBalance shopBalance)
    {
        return shopBalanceMapper.insertShopBalance(shopBalance);
    }

    /**
     * 修改商户余额
     * 
     * @param shopBalance 商户余额
     * @return 结果
     */
    @Override
    public int updateShopBalance(ShopBalance shopBalance)
    {
        return shopBalanceMapper.updateShopBalance(shopBalance);
    }

    @Override
    public int updateShopBalanceByMid(ShopBalance shopBalance)
    {
        return shopBalanceMapper.updateShopBalanceByMid(shopBalance);
    }

    /**
     * 批量删除商户余额
     * 
     * @param ids 需要删除的商户余额主键
     * @return 结果
     */
    @Override
    public int deleteShopBalanceByIds(Long[] ids)
    {
        return shopBalanceMapper.deleteShopBalanceByIds(ids);
    }

    /**
     * 删除商户余额信息
     * 
     * @param id 商户余额主键
     * @return 结果
     */
    @Override
    public int deleteShopBalanceById(Long id)
    {
        return shopBalanceMapper.deleteShopBalanceById(id);
    }
}
